package com.jz.learning.demo.DEMO_03.aop;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class MyAspect {

	Log log = LogFactory.getLog(MyAspect.class.getName());

	@Pointcut("execution(public * com.jz.learning.demo.DEMO_03.pojo..*.*(..))")
	public void abc(){
		log.info("#####before");
	}

	@Around("abc()")
	private String aroundMethod(ProceedingJoinPoint point) throws Throwable{
		//int res = (int)point.proceed();
		log.info("######around.....");
		point.proceed();
		return "替换了";
	}
}
